package org.brisling.oa.service;

import org.brisling.base.domain.ListDomain;
import org.brisling.base.domain.RetDomain;
import org.brisling.common.ConstSysParam;
import org.brisling.oa.domain.OAEquipmentPurchaseBigSub;
import org.brisling.oa.repository.OAEquipmentPurchaseBigSubRepo;
import org.brisling.oa.service.base.BaseOaSubService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/oaEquipmentPurchaseBigSub")
/**
 * 
 * <p>
 * Title: OAEquipmentPurchaseBigSubService
 * </p>
 * <p>
 * Description: 大型设备采购子表类
 * </p>
 * <p>
 * Company: 长沙东勤信息科技发展有限公司
 * </p>
 * 
 * @author jackson wang
 * @since 1.0
 * @version 1.0
 * @date 2017年7月25日 上午11:04:41
 */
public class OAEquipmentPurchaseBigSubService extends BaseOaSubService<OAEquipmentPurchaseBigSub> {

	@SuppressWarnings("unused")
	@Autowired
	private OAEquipmentPurchaseBigSubRepo baseSubRepo;

	public OAEquipmentPurchaseBigSubService() {
		this.clazz = OAEquipmentPurchaseBigSub.class;
		this.moduleName = ConstSysParam.MODULE_OA_EQUIPMENTSPURCHASESUB_BIG;
	}

	/**
	 * 保存耗材信息子表数据集合
	 * 
	 * @param mainId
	 *            主表记录id
	 * @param jsonData
	 *            耗材信息子表数据集合
	 */
	@RequestMapping("/saveList.action")
	public RetDomain saveList(@RequestParam(value = "mainId", required = false) Long mainId,
			@RequestParam(value = "jsonData", required = false) String jsonData) {
		return super.saveList(mainId, jsonData);
	}

	/**
	 * 分页查询耗材子表数据集合
	 * 
	 * @param mainId
	 * @param page
	 * @param rows
	 * @return
	 */
	@RequestMapping("/getListDomain.action")
	public ListDomain<OAEquipmentPurchaseBigSub> getListDomain(
			@RequestParam(value = "page", required = false) String page,
			@RequestParam(value = "rows", required = false) String rows,
			@RequestParam(value = "mainId", required = false) Long mainId) {

		return super.getPagedListDomainByMainId(mainId, page, rows);

	}
}
